package com.ruoyi.mk.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mk.mapper.MkConfigurationMapper;
import com.ruoyi.mk.domain.MkConfiguration;
import com.ruoyi.mk.service.IMkConfigurationService;

/**
 * 配置下行Service业务层处理
 * 
 * @author guan
 * @date 2021-12-09
 */
@Service
public class MkConfigurationServiceImpl implements IMkConfigurationService 
{
    @Autowired
    private MkConfigurationMapper mkConfigurationMapper;

    /**
     * 查询配置下行
     * 
     * @param id 配置下行主键
     * @return 配置下行
     */
    @Override
    public MkConfiguration selectMkConfigurationById(String id)
    {
        return mkConfigurationMapper.selectMkConfigurationById(id);
    }

    /**
     * 查询配置下行列表
     * 
     * @param mkConfiguration 配置下行
     * @return 配置下行
     */
    @Override
    public List<MkConfiguration> selectMkConfigurationList(MkConfiguration mkConfiguration)
    {
        return mkConfigurationMapper.selectMkConfigurationList(mkConfiguration);
    }

    /**
     * 新增配置下行
     * 
     * @param mkConfiguration 配置下行
     * @return 结果
     */
    @Override
    public int insertMkConfiguration(MkConfiguration mkConfiguration)
    {
        mkConfiguration.setCreateTime(DateUtils.getNowDate());
        return mkConfigurationMapper.insertMkConfiguration(mkConfiguration);
    }

    /**
     * 修改配置下行
     * 
     * @param mkConfiguration 配置下行
     * @return 结果
     */
    @Override
    public int updateMkConfiguration(MkConfiguration mkConfiguration)
    {
        return mkConfigurationMapper.updateMkConfiguration(mkConfiguration);
    }

    /**
     * 批量删除配置下行
     * 
     * @param ids 需要删除的配置下行主键
     * @return 结果
     */
    @Override
    public int deleteMkConfigurationByIds(String[] ids)
    {
        return mkConfigurationMapper.deleteMkConfigurationByIds(ids);
    }

    /**
     * 删除配置下行信息
     * 
     * @param id 配置下行主键
     * @return 结果
     */
    @Override
    public int deleteMkConfigurationById(String id)
    {
        return mkConfigurationMapper.deleteMkConfigurationById(id);
    }
}
